function Satpos = get_sat_ephemeris(sat,startime,endtime,samples)
%GET_SAT_ 此处显示有关此函数的摘要
%   此处显示详细说明
    samples = seconds(samples);
    timeRange = startime : samples : endtime;    % 时间轴
    time_size = length(timeRange);
    disp("正在获取卫星位置速度(ecef)");
    h = waitbar(0, '正在获取卫星位置速度...');
    numSatellites = numel(sat.sat);
    for j = 1:time_size
        [position,velocity] = states(sat.sat,timeRange(j),"CoordinateFrame","ecef");
        Satpos(j).posvel = [reshape(position, 3, numSatellites)',reshape(velocity, 3, numSatellites)'];
        Satpos(j).time = timeRange(j);
        waitbar(j / time_size, h, sprintf('进度: %d%%', round(j / time_size * 100)));
    end
    close(h);
    disp(['共成功获取',num2str(time_size),'个历元的卫星位置速度']);
end

